package org.jcc.core.log;

import java.util.logging.Level;
import java.util.logging.Logger;

public class Log {
	public static void main(String[] args) {
		// this will close all log output
		Logger.getGlobal().setLevel(Level.OFF);
		
		// deprecated
//		Logger.global.info("hello log");
		Logger.getGlobal().info("hello log");
		
		/*
		 * When you request a logger with a given name for the first time, it is created.
		 * Logger myLogger = Logger.getLogger("com.mycompany.myapp");
		 * Subsequent calls to the same name yield the same logger object.
		 * 
		 * Similar to package names, logger names are hierarchical. 
		 * In fact, they are more hierarchical than packages. 
		 * There is no semantic relationship between a package and its parent, 
		 * but logger parents and children share certain properties. 
		 * 
		 * For example, if you set the log level on the logger "com.mycompany", 
		 * then the child loggers inherit that level.
		 */
		Logger myLogger = Logger.getLogger("org.jcc.core");
		myLogger.severe("bad thing happen!");
		
		System.out.println("hello");
	}

}
